﻿using NUnit.Framework;
using RMH.Entities;
using RMH.Services;

namespace RMH.UnitTests.Web.Controllers.StayControllerSpecs
{
    [TestFixture]
    public class StayService_when_saving_a_new_stay : base_automock_test
    {
        Stay stayToCreate = new Stay();

        public override void establish_context()
        {
            Mock<IStayService>()
                .Setup(s => s.Save(stayToCreate));
        }

        public override void because()
        {
            Create<IStayService>().Save(stayToCreate);
        }

        [Test]
        public void the_stay_repository_saves_the_new_stay()
        {
            Mock<IStayService>()
                .Verify(s => s.Save(stayToCreate));
        }
    }
}
